package cj.web.portal.dao;
/*
 *  
 *  
*/
import java.util.List;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.SQLParam;
import cj.web.kly.domain.GroupDep;

/**
 * 
 * @author 
 *
 */
@DAO
public interface GroupDepVoDAO{
	
	@SQL("SELECT id,groupId,name,carouselImage,url FROM GroupDep WHERE deleteFlag=1 AND groupId IN (##(:ids)) ORDER BY groupId,orderNo ")
    List<GroupDep> queryNameByGroupId(@SQLParam("ids")String groupIds);
	
	@SQL("SELECT id,groupId,name,carouselImage,cssName,url FROM GroupDep WHERE deleteFlag=1 AND groupId=:1 ORDER BY orderNo ")
    List<GroupDep> queryNameByGroupId(int groupId);
	
	@SQL("SELECT a.id,a.url,a.groupId,a.name,a.carouselImage,a.duties,a.achievements,a.link,b.name as groupName FROM GroupDep a join GroupInfor b on a.groupId = b.id WHERE a.deleteFlag=1 AND a.id=:1 ")
    GroupDep queryNameBydepId(int id);
	
	@SQL("SELECT id,name FROM GroupDep WHERE deleteFlag=1 AND id=:1 ")
    GroupDep queryById(int id);
}